//package com.jackrain.nea.conf;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.context.request.async.DeferredResult;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
//
//import java.util.ArrayList;
//
///**
// * Created by jackrain on 16/9/27.
// */
//@Configuration
//@EnableSwagger2
//public class SwaggerConf {
//
//    @Bean
//    public Docket createRestApi() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .genericModelSubstitutes(DeferredResult.class)
//                //.genericModelSubstitutes(ResponseEntity.class)
//                .useDefaultResponseMessages(false)
//                //.forCodeGeneration(true)
//                .forCodeGeneration(false)
//                .pathMapping("/")// base，最终调用接口后会和paths拼接在一起
//                .select()
//                .paths(PathSelectors.any())//过滤所有路径
//                .build()
//                .apiInfo(ApiInfo());
//    }
//
//
//
//    private ApiInfo ApiInfo() {
//        Contact contact = new Contact("jackrain", "", "jackrain@hotmail.com");
//        ApiInfo apiInfo=new ApiInfo("RAIN_API接口", "Api 接口文档", "1.0", "urn:tos", contact, "raincloud 2.0", "http://raincloud/licenses/LICENSE-2.0", new ArrayList());
////        ApiInfo apiInfo = new ApiInfo("RAIN_API接口",//大标题
////                "REST风格API",//小标题
////                "0.1",//版本
////                "www.baidu.com",
////                contact,//作者
////                "主页",//链接显示文字
////                ""//网站链接
////        );
//        return apiInfo;
//    }
//
//
//
//}
